/****************************************************************************/
/* NAME:           osmolator.h                                              */
/* PURPOSE:        Osmolator management                                     */
/* CREATED_BY:     G.Auzuret                                                */
/* CREATION_DATE:  07/05/2012                                               */
/************************************** (C) Copyright 2012 AquaLink *********/

#include "config.h"

typedef enum
{
    ONE_SENSOR_WITHOUT_RESERVE = 0, // Connect sensor on low input
    ONE_SENSOR_WITH_RESERVE,    // Connect sensor on low input
    TWO_SENSOR_WITHOUT_RESERVE,
    TWO_SENSOR_WITH_RESERVE,
    OFF_MODE
}Osmo_Sensor_Mode_t;

typedef enum
{
    OSMO_LOW_LEVEL = 0,
    OSMO_MIDDLE_LEVEL,
    OSMO_HIGH_LEVEL
}Osmo_Water_level_t;

/**
  *@brief  Main function of osmolator module.
  * @param  none
  * @retval None
  */
void vTaskCTRL_OSMOLATOR();

/**
  * @brief  Check the water level with one sensor.
  * @param  none
  * @retval Level of water (low,middle,high)
*/
Osmo_Water_level_t Osmo_CheckWaterLevel_OneSensor(void);

/**
  * @brief  Initialisation of modules.
  * @param  none
  * @retval None
  */
Osmo_Water_level_t Osmo_CheckWaterLevel_TwoSensor(void);

/**
  * @brief  Set osmolator mode
  * @param  none
  * @retval none
*/
void Osmo_SetMode(uint8_t SensorMode, uint8_t reserve);

/**
  * @brief  Check water level
  * @param  none
  * @retval none
*/
uint8_t Osmo_GetWaterLevel(void);




/*______ E N D _____ (osmolator.h) ___________________________________*/
